/**
 * @ author: 汪孟苹
 */
define(["jquery","bbcare","comm/datatable/datatable","bch/app/selfRecord/selfRecordList.servers","bch/app/selfRecord/selfRecordList.ui"],function($,$bb,$datatable,$servers,$ui) {
    var selfRecordList = {};

    selfRecordList.init = function(){
        var params = $bb.getPageParams();
        var title = params.kind == "1" ? "儿童体检自我记录" :  params.kind == "2" ? "孕前自我记录" : params.kind == "3" ? "孕期自我记录" : "自我记录";
        $("#selfRecordListTit").html( title );
        $ui.datatableForm({
            "id":"datatableForm",
            "kind":params.kind
        });
        $ui.datatableBox({
            "dom":$("#datatable thead tr"),
            "kind":params.kind
        });
        // datatable
        var id = $(".layout-bottom table").attr("id");
        $datatable.init({
            "id": id,
            "options": $servers.getOptions()
        });
    }

    return selfRecordList;
});